        # file: entry.S
        # date: 23.04.25
        # auther: xin
        # brief: 程序入口，栈指针赋值
        # version: 0.1

.section .text
.global _entry
_entry:
        # brief 入口函数，sp = stack0 + 4096*mhartid + 4096
        # param stack0 基本栈顶地址，在start.c定义
        # return null
        la sp, stack0
        li a0, 4096
        csrr a1, mhartid
        addi a1, a1, 1
        mul a0, a0, a1 
        add sp, sp, a0 
        call start
        
        # brief 无限循环
spin:
        j spin